var app = new Vue({
    el: "#app",
    data: {
        user: {}
    },
    methods: {
        save: function() {
            console.log('save')
        }
    },
    mounted: function() {
        instance({
            method: 'get',
            url: 'api/user/getUser'
        }).then(res => {
            if (res.data.info.code == 201) {
                show("未登录")
                sleep(1000).then(() => {
                    // 这里写sleep之后需要去做的事情
                    window.location = "login.html"
                })
            } else {

                this.user = res.data.data
            }
        })
    }
})